(1) Field of the Invention
The present invention relates to image coding apparatuses and image coding methods by which a moving image is coded with high efficiency, and particularly to motion compensation inter prediction coding in which coding is performed using temporally-previous and temporally-subsequent images.
(2) Description of the Related Art
As a technique for coding moving image data such as TV signals with high efficiency for recording or transmission, a coding system such as the MPEG (Moving Picture Experts Group) system has been designed, and is an international-standard coding system as the MPEG-1 standard, the MPEG-2 standard, and MPEG-4 standard. Further, as a system of further improving a compression ratio, the H. 264/AVC (Advanced Video Coding) standard and the like have been established.
For the moving image coding, in general, two coding modes have been appropriately employed, such as an intra prediction coding mode in which a coded image in the same picture as a coding target image is used as a reference image, and a motion compensation inter prediction coding mode in which previous and subsequent pictures on the temporal axis are used as reference images.
The H. 264/AVC standard employs a data structure composed of hierarchies, as similar to the MPEG-2 standard, and a slice is used as a unit by which the intra prediction coding mode and the motion compensation inter prediction coding mode are switched to each other. While a picture is used as a unit by which coding modes are switched to each other in the MPEG-2 standard, the slice that is a low-order hierarchy next to the picture is used as a unit of switching the modes in the H. 264/AVC standard.
As for the above-described slices, a slice in which the intra prediction coding is performed is called I slice. In addition thereto, a slice in which the motion compensation inter prediction coding can be performed by referring to one reference image block in the previous coded picture on the temporal axis is called P slice. Further, in addition thereto, a slice in which the motion compensation inter prediction coding can be performed by referring to two reference image blocks of an arbitrary combination in the previous or subsequent coded picture on the temporal axis is called B slice.
Next, as a block size by which the inter prediction coding is performed is smaller, a detailed prediction can be performed. Thus, it is possible to minimize a difference between a coding target image and a prediction image. On the other hand, as a block size is smaller, motion vector information needs to be coded for each block. Thus, a coding amount is increased. Accordingly, a plurality of block sizes are provided in many moving image coding systems, and a technique for using the optimum block size while switching these sizes has been adopted.
As a technique for selecting the optimum coding mode, two systems of a simplified (non-RD-opt) system and a Rate-Distortion optimization (RD-opt) system are prepared in reference software provided by, for example, a standardization committee that is called JM (Joint Model). The reference software performs a process so that a coding cost is calculated by a certain formula for each mode, and a coding mode with the minimum coding cost is selected.